Ext.define('App.controller.customer.CustomerGrantWindowController', {
	extend : 'Ext.app.ViewController',
	alias : 'controller.customerGrantWindowController',
	control : {
		'customerGrantWindow itemselector':{
			render:function(itemselector){
				itemselector.getStore().load();
			}
		},
		'customerGrantWindow [action=save]' : {
			click : function(btn) {
				var win = btn.up('window');
				BaseUtil.submit(win.down('form'),win.params.url, function(data) {
					BaseUtil.toast(data.msg);
					win.close();
				});
			}
		}
	}
});